//
//  IconCollectionVIewCell.m
//  ceshi
//
//  Created by liutaifeng on 16/5/19.
//  Copyright © 2016年 liutaifeng. All rights reserved.
//

#import "IconCollectionVIewCell.h"
#import "Common.h"
@implementation IconCollectionVIewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    
    
    self.picImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:_picImageView];
    
    self.titleLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_titleLabel];
}
- (void)layoutSubviews {
    [super layoutSubviews];
    self.contentView.backgroundColor = [UIColor whiteColor];
    _picImageView.frame = CGRectMake(MAIN_WIDTH / 6 / 5, MAIN_HEIGHT / 500, MAIN_WIDTH / 6 / 5 * 3, MAIN_WIDTH / 6 / 5 * 3);
    _picImageView.layer.cornerRadius = MAIN_WIDTH / 6 / 3 * 2 / 2;
    _titleLabel.frame = CGRectMake(0, MAIN_WIDTH / 6 / 5 * 3 + MAIN_HEIGHT / 500, MAIN_WIDTH / 6, MAIN_HEIGHT / 12 - MAIN_WIDTH / 6 / 5 * 3 - MAIN_HEIGHT / 500);
    _titleLabel.textAlignment = NSTextAlignmentCenter;
    _titleLabel.textColor = [UIColor grayColor];
    _titleLabel.font = [UIFont systemFontOfSize:11 / 375.0 * MAIN_WIDTH];
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
